#include <bits/stdc++.h>

using namespace std;

const double eps=1e-5;
const int maxm=30;
const int maxn=1000;

int ans[maxm],pth[maxm];
double pans;
double po[2][maxn+5]; //0-co 1-vo
int val[maxn+5];

inline double dcmp(const double &x){if(fabs(x)<eps) return 0;return x>0?1:-1;}
void dfs(int place,bool vowel,double pos,int cont){
    bool flag=0;
    if(pth[val[place]]==-1) pth[val[place]]=vowel,flag=1;
    else if(pth[val[place]]!=vowel) return;
    if(place==maxn){
        if(dcmp(pos-pans)>0){
            memcpy(ans,pth,sizeof ans);
            pans=pos;
        }
    }else{
        double pvo,pco;
        if(vowel) pco=1,pvo=po[1][cont];
        else pvo=1,pco=po[0][cont];
        if(dcmp(pvo)>0) dfs(place+1,1,pos*pvo,vowel?cont+1:1);
        if(dcmp(pco)>0) dfs(place+1,0,pos*pco,vowel?1:cont+1);
    }
    if(flag) pth[val[place]]=-1;
}

int main(){
    freopen("rng.in","r",stdin);
    freopen("rng.out","w",stdout);

    char *str = new char[maxn+5];
    int m;

    po[1][1]=0.5;
    for(int i=2;i<=maxn;i++) po[1][i]=po[1][i-1]*0.5;
    po[0][1]=2.0/3;
    for(int i=2;i<=maxn;i++) po[0][i]=po[0][i-1]*po[0][1];
    scanf("%d",&m);
    for(int i=0;i<100;i++){
        scanf("%s",str);
        for(int j=1;j<=1000;j++) val[j]=str[j-1]-'a'+1;
        pans=0;
        memset(ans,-1,sizeof ans);
        memset(pth,-1,sizeof pth);
        dfs(1,1,1,1);
        dfs(1,0,1,1);
        for(int j=1;j<=m;j++) printf("%c",ans[j]?'V':'C');
        putchar('\n');
    }
}
